package com.transsion.clouddemo.core.Custom

import android.os.SystemClock
import android.view.View

abstract class CloudClickListener : View.OnClickListener {

    private var mLastTime: Long = 0L
    private val mTimeInterval: Long = 300L

    override fun onClick(v: View) {
        val nowTime = SystemClock.elapsedRealtime()
        if (nowTime - mLastTime >= mTimeInterval) {
            onSingleClick(v)
            mLastTime=nowTime
        }
    }

    abstract fun onSingleClick(view: View)
}